package com.gameShare.exceptions

import com.gameShare.enums.misc.ResponseCodeEnum

class BusinessException : RuntimeException {
    var code: Int = 0

    constructor(code: Int, msg: String) : super(msg) {
        this.code = code
    }

    constructor(code: Int, msg: String, cause: Throwable? = null) : super(msg, cause) {
        this.code = code
    }

    constructor(responseCodeEnum: ResponseCodeEnum) : super(responseCodeEnum.msg){
        code = responseCodeEnum.code
    }
}